function LoginController() {

  this.validarSubmitLoginForm = function() {
      // validate and process form
      // first hide any error messages
      $('.error').hide();
      //alert('============= LoginController.validarSubmitLoginForm 1');

      var email = $("input#email").val();
      if (email == "") {
          $("label#email_error").show();
          $("input#email").focus();
          return false;
      }
      //alert('============= LoginController.validarSubmitLoginForm 3');

      var passwrd = $("input#passwrd").val();
      if (passwrd == "") {
          $("label#passwrd_error").show();
          $("input#passwrd").focus();
          return false;
      }
      //alert('============= LoginController.validarSubmitLoginForm 4');

      var dataString = 'email=' + email + '&password=' + passwrd;
      //alert (dataString);return false;
      //alert('============= LoginController.validarSubmitLoginForm 5');

      $.ajax({
          type: "POST",
          url: "checkUserLogin.dahtml",
          dataType: "json",    
          data: dataString,
          success: function(json, statusText) {
              //alert("=== this "+this.data);
              //alert("==== statusText " + statusText);
              //alert("==== json.Response " + json.Response.dataObject);
              userContext = json.Response.dataObject;
              //alert("==== userContext.nickname= "+ userContext.nickname);
              $('#contact_form').html("<div id='message'></div>");
              $('#message').html("<h2>Contact Form Submitted!</h2>")
                           .append("<p>We will be in touch soon.</p>")
                           .hide()
                           .fadeIn(1000, function() {
                                   $('#message').append("<br/><img id='checkmark' src='images/login-layer/check.png' />");
                           });
              //alert("antes del fadeIn");
              $("#panelWelcoUserP").html("Bienvenido -" + userContext.nickname + "-");
              $("#panelWelcoUserLayerDiv").fadeIn(3500, function() {
                  // Animation complete
              });
              //alert("antes del fadeOut");
              $("#panelLoginLayerDiv").fadeOut(3500, function() {
                  // Animation complete
              });
              //alert("antes del fin");

          }
      });
      return false;
  };

}